package com.ruoyi.system.domain;

import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel("学习报告实体类")
public class StudyReport {
    @ApiModelProperty("单词学习记录")
    private WordLearning wordLearning;

    @ApiModelProperty("测试记录")
    private Tests tests;

    public WordLearning getWordLearning() {
        return wordLearning;
    }

    public void setWordLearning(WordLearning wordLearning) {
        this.wordLearning = wordLearning;
    }

    public Tests getTests() {
        return tests;
    }

    public void setTests(Tests tests) {
        this.tests = tests;
    }

    @ApiModel("单词学习记录")
    public static class WordLearning {
        @ApiModelProperty("每周学习进度")
        private List<WeeklyProgress> weeklyProgress;

        public List<WeeklyProgress> getWeeklyProgress() {
            return weeklyProgress;
        }

        public void setWeeklyProgress(List<WeeklyProgress> weeklyProgress) {
            this.weeklyProgress = weeklyProgress;
        }
    }

    @ApiModel("每周学习进度")
    public static class WeeklyProgress {
        private String date; // 日期，格式：YYYY-MM-DD

        @ApiModelProperty("每日学习单词数")
        private Integer learningWords;

        public String getDate() {
			return date;
		}

		public void setDate(String date) {
			this.date = date;
		}

		public Integer getLearningWords() {
            return learningWords;
        }

        public void setLearningWords(Integer learningWords) {
            this.learningWords = learningWords;
        }
    }

    @ApiModel("测试记录")
    public static class Tests {
        @ApiModelProperty("总记录数")
        private Integer total;

        @ApiModelProperty("测试记录列表")
        private List<TestRecord> testRecords;

        public Integer getTotal() {
            return total;
        }

        public void setTotal(Integer total) {
            this.total = total;
        }

        public List<TestRecord> getTestRecords() {
            return testRecords;
        }

        public void setTestRecords(List<TestRecord> testRecords) {
            this.testRecords = testRecords;
        }
    }

    @ApiModel("测试记录详情")
    public static class TestRecord {
        @ApiModelProperty("测试ID")
        private String testId;

        @ApiModelProperty("课程ID")
        private String courseId;

        @ApiModelProperty("课程名称")
        private String courseName;

        @ApiModelProperty("课程单元")
        private String courseUnit;

        @ApiModelProperty("测试类型")
        private String testType;

        @ApiModelProperty("得分")
        private Integer score;

        @ApiModelProperty("测试日期")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
        private Date date;

        @ApiModelProperty("测试耗时（秒）")
        private Integer duration;

        @ApiModelProperty("总题目数")
        private Integer totalQuestions;

        @ApiModelProperty("正确答题数")
        private Integer correctAnswers;

        @ApiModelProperty("是否通过")
        private Boolean passed;

        public String getTestId() {
            return testId;
        }

        public void setTestId(String testId) {
            this.testId = testId;
        }

        public String getCourseId() {
            return courseId;
        }

        public void setCourseId(String courseId) {
            this.courseId = courseId;
        }

        public String getCourseName() {
            return courseName;
        }

        public void setCourseName(String courseName) {
            this.courseName = courseName;
        }

        public String getCourseUnit() {
            return courseUnit;
        }

        public void setCourseUnit(String courseUnit) {
            this.courseUnit = courseUnit;
        }

        public String getTestType() {
            return testType;
        }

        public void setTestType(String testType) {
            this.testType = testType;
        }

        public Integer getScore() {
            return score;
        }

        public void setScore(Integer score) {
            this.score = score;
        }

        public Date getDate() {
            return date;
        }

        public void setDate(Date date) {
            this.date = date;
        }

        public Integer getDuration() {
            return duration;
        }

        public void setDuration(Integer duration) {
            this.duration = duration;
        }

        public Integer getTotalQuestions() {
            return totalQuestions;
        }

        public void setTotalQuestions(Integer totalQuestions) {
            this.totalQuestions = totalQuestions;
        }

        public Integer getCorrectAnswers() {
            return correctAnswers;
        }

        public void setCorrectAnswers(Integer correctAnswers) {
            this.correctAnswers = correctAnswers;
        }

        public Boolean getPassed() {
            return passed;
        }

        public void setPassed(Boolean passed) {
            this.passed = passed;
        }
    }
}